<template>
  <el-table
    :data="tableData"
    stripe
    style="width: 100%">
    <el-table-column
      prop="date"
      label="日期"
      width="300px">
    </el-table-column>
    <el-table-column
      prop="name"
      label="姓名"
      width="300px">
    </el-table-column>
    <el-table-column
      prop="academic"
      label="学院"
      width="300px">
    </el-table-column>
    <el-table-column
      prop="statue"
      label="状态"
      width="300px">
    </el-table-column>
  </el-table>
</template>

<script>
import axios from 'axios'

export default {
  data () {
    return {
      tableData: []
    }
  },
  created () {
    this.getParams();
  },
  methods:{
    getParams(){
      const routerParams = this.$route.query.table3;
      this.tableData=routerParams
      console.log(routerParams)
    }
  },
  watch: {
// 监测路由变化,只要变化了就调用获取路由参数方法将数据存储本组件即可
    '$route': 'getParams'
  }
}
</script>
